import java.util.*;

/**
 * @author LKQ
 * @date 2022/4/11 8:32
 * @description 排列组合
 */
public class Solution {
    public static void main(String[] args) {
        Solution solution = new Solution();
        solution.countNumbersWithUniqueDigits(3);
    }

    public int countNumbersWithUniqueDigits(int n) {
        if (n == 0) {
            return 1;
        }
        int pre = 10;
        int p = 9;
        for (int i = 0; i < n - 1; i++) {
            p *= 9 - i;
            pre += p;
        }
        return pre;
    }
}